<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>YUI3 YUI Tests - [#] </title>
    <script type="text/javascript" src="http://yui.yahooapis.com/3.0.0pr2/build/yui/yui-min.js"></script>
    <!--<script type="text/javascript" src="../lib/yui3/yui/yui-min.js"></script>-->
</head>
<body class="yui-skin-sam">
<h1>
    <script>document.write(document.title)</script>
</h1>

<div id="test"></div>

<script type="text/javascript">
    YUI().use('node', 'base', 'json', 'yuitest', 'console', function(Y) {//{base:'../lib/yui3/'}

        Y.YUITests = new Y.Test.Case({
            name: 'Event Simulation',
            testEvent:function() {
                var field = Y.Node.create('<input id="input0" value="oldValue"/>')
                Y.Node.get('#test').appendChild(field)
                field.on('focus', function() {
                    Y.log('focused', 'info', 'Test')
                    this.resume(function() {
                        Y.Assert.isTrue(true);//TODO test sth
                    });
                })
                Y.Event.simulate(Y.Node.getDOMNode(field), 'focus')
                this.wait(2000);
            }
        })

        var console = new Y.Console()
        console.get('contentBox').setStyle('width', (Y.get('body').get('docWidth') * 3 / 4) + 'px')
        console.render()
        console.get('contentBox').query('div .yui-console-bd').setStyle('height', (Y.get('body').get('docHeight') * 4 / 5) + 'px')
        //console.on('entry', function(e) {if (e.message.source !== 'TestRunner') { e.preventDefault()} })

        Y.Test.Runner.add(Y.YUITests);
        Y.Test.Runner.run();
    })
</script>
</body>

</html>
